package com.longcheer.weibo;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class DBHelper extends SQLiteOpenHelper {
    
    private static final String DB_NAME = "weibo.db";    
    private static final int DEFAULT_VERSION = 1;
    
    private static final String CREATE_TABLE_WEIBO_PROVINCE = 
        "create table if not exists weibo_province(" +
        "code integer primary key," +
        "json text)";
    
    public static final String STATUS_TABLE = "weibo_status";
    public static final String USER_TABLE = "weibo_user";
    
    public DBHelper(Context context) {
        super(context, DB_NAME, null, DEFAULT_VERSION);
    }
    
    public DBHelper(Context context, String name, CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(CREATE_TABLE_WEIBO_PROVINCE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        // do nothing
    }

}
